/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package com.plian.system.entity.qg.guarantee;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 企业担保执行主表实体类
 *
 * @author jianglei
 * @since 2019-10-24
 */
@Data
@TableName("qg_property_guarantee_execute")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "PropertyGuaranteeExecute对象", description = "企业担保执行主表")
public class PropertyGuaranteeExecute extends BaseEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 单据编码
	*/
	@ApiModelProperty(value = "单据编码")
		private String code;
	/**
	* 上游单据编码
	*/
	@ApiModelProperty(value = "上游单据编码")
		private String upstreamCode;
	/**
	* 上游单据编码id
	*/
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "担保申请单id")
		private Long upstreamCodeId;

	/**
	 * 申请批复文号
	 */
	@ApiModelProperty(value = "申请批复文号")
	private String approvalNumber;
	/**
	* 申请公司名称
	*/
	@ApiModelProperty(value = "申请公司名称 单位id")
	private String applyNameId;
	/**
	* 担保项目名称
	*/
	@ApiModelProperty(value = "担保项目名称")
	private String guaranteeName;

	/**
	 * 担保人
	 */
	@ApiModelProperty(value = "担保人 单位id")
	private String guaranteeCompanyId;

	/**
	 * 被担保人
	 */
	@ApiModelProperty(value = "被担保人 单位id")
	private String warranteeCompanyName;

	/**
	* 担保金额上限
	*/
	@ApiModelProperty(value = "担保金额上限")
	private BigDecimal guaranteeAmount;

	/**
	 * 担保金额
	 */
	@ApiModelProperty(value = "本次担保金额（万元）", required = true)
	private BigDecimal useAmount;

	/**
	* 担保方式
	*/
	@ApiModelProperty(value = "担保方式")
		private String guaranteeModeId;
	/**
	* 担保责任
	*/
	@ApiModelProperty(value = "担保责任")
		private String guaranteeDutyId;
	/**
	* 担保起始日
	*/
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
	@TableField(value = "guarantee_start_date",updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "担保起始日", required = true)
		private Date guaranteeStartDate;
	/**
	* 担保终止日
	*/
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
	@TableField(value = "guarantee_end_date",updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "担保终止日")
		private Date guaranteeEndDate;
	/**
	* 实际担保终止日
	*/
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
	@TableField(value = "guarantee_actual_date",updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "实际担保终止日")
		private Date guaranteeActualDate;
	/**
	* 担保期限(月)
	*/
	@ApiModelProperty(value = "担保期限(月)")
		private String guaranteeLimit;
	/**
	* 借款金额（万元）
	*/
	@ApiModelProperty(value = "借款金额（万元）", required = true)
		private BigDecimal loanAmount;
	/**
	* 累计借款额
	*/
		//@ApiModelProperty(value = "累计借款额")
		//private BigDecimal totalLoanAmount;
	/**
	* 借款资金种类
	*/
	@ApiModelProperty(value = "借款资金种类")
		private String loanTypeId;
	/**
	* 借款起始日
	*/
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
	@TableField(value = "loan_start_date",updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "借款起始日", required = true)
		private Date loanStartDate;
	/**
	* 借款终止日
	*/
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
	@TableField(value = "loan_end_date",updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "借款终止日", required = true)
		private Date loanEndDate;
	/**
	* 借款期限(月)
	*/
	@ApiModelProperty(value = "借款期限(月)", required = true)
		private Integer loanLimit;
	/**
	* 借款性质
	*/
	@ApiModelProperty(value = "借款性质")
		private String loanNatureId;

	/**
	* 版本号
	*/
		private String version;
	/**
	* 备注
	*/
	@ApiModelProperty(value = "备注")
		private String remark;
	/**
	* 审批人
	*/
		private String approvedUser;
	/**
	* 审批时间
	*/
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
		private Date approvedTime;
	/**
	* 审批意见
	*/
		private String approvedOpinion;
	/**
	* 乐观锁字段
	*/
		private Integer tsVersion;
	/**
	* 审批流主键
	*/
		private String formType;
	/**
	* 备选1
	*/
		private String def1;
	/**
	* 备选2
	*/
		private String def2;
	/**
	* 备选3
	*/
		private String def3;
	/**
	* 备选4
	*/
		private String def4;
	/**
	* 备选5
	*/
		private String def5;
	/**
	* 备选6
	*/
		private String def6;
	/**
	* 备选7
	*/
		private String def7;
	/**
	* 备选8
	*/
		private String def8;
	/**
	* 备选9
	*/
		private BigDecimal def9;
	/**
	* 备选10
	*/
		private BigDecimal def10;
	/**
	* 备选11
	*/
		private BigDecimal def11;
	/**
	* 备选12
	*/
		private BigDecimal def12;
	/**
	* 备选13
	*/
		private BigDecimal def13;
	/**
	* 备选14
	*/
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
		private Date def14;
	/**
	* 备选15
	*/
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
		private Date def15;
	/**
	* 备选16
	*/
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
		private Date def16;
	/**
	* 备选17
	*/
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
		private Date def17;
	/**
	* 备选18
	*/
	@JsonSerialize(using = ToStringSerializer.class)
		private Long def18;
	/**
	* 备选19
	*/
	@JsonSerialize(using = ToStringSerializer.class)
		private Long def19;
	/**
	* 备选20
	*/
	@JsonSerialize(using = ToStringSerializer.class)
		private Long def20;

	/**
	 * 还款后是否增加剩余担保金额 1否2是
	 */
	@ApiModelProperty(value = "还款后是否增加剩余担保金额 1否2是", required = true)
	private Integer isAdd;

	/**
	 * 担保是否结束 1否2是
	 */
	@ApiModelProperty(value = "担保是否结束 1否2是")
	private Integer isEnd;

	/**
	 * 数据来源 null为系统填报 对应用户id
	 */
	@ApiModelProperty(value = "数据来源 null为系统填报 对应用户id")
	private String dataSource;

	/**
	 * 数据来源id
	 */
	@ApiModelProperty(value = "数据来源id", required = true)
	private String dataSourceId;
}
